// pages/auth/index.js
import wxApi from "../../utils/wxApi"
Page({

  /**
   * 页面的初始数据
   */
  data: {

  },
  
  getUsersInfo: async function (e) {
    try{
      let { encryptedData, rawData, iv, signature } = e.detail;
      let { code } = await wxApi.login();
        let token = "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOjIzLCJpYXQiOjE1NjQ3MzAwNzksImV4cCI6MTAwMTU2NDczMDA3OH0.YPt-XeLnjV-_1ITaXGY2FhxmCe4NvXuRnRB8OMCfnPo";

        wx.setStorageSync('token', token);
        wx.navigateBack({
          delta: 1,
        })
    }catch(err){
      console.logerr
    }
    

  },
})